package com.example.service.impl;

import com.example.mapper.EmployeeMapper;
import com.example.model.Employee;
import com.example.service.EmployeeService;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

import java.util.List;

@RequiredArgsConstructor
@Service
public class EmployeeServiceImpl implements EmployeeService {
    private final EmployeeMapper employeeMapper;
    @Override
    public Employee getEmployeeById(int id) {
        return employeeMapper.selectById(id);
    }

    @Override
    public List<Employee> getBusinessEmployees() {
        return employeeMapper.getBusinessEmployees();
    }

    @Override
    public void update(Employee employee) {
        employeeMapper.updateById(employee);
    }

}
